﻿using Nuwanda.Common;
using Nuwanda.TfsSpotlight.Data;
using System.Windows.Forms;
using StructureMap;

namespace Nuwanda.TfsSpotlight.Views.Query
{
    [Author("Bartłomiej Legiędź")]
    [PluginFamily("QueryView")]
    public interface IQueryView : IBaseControl
    {
        void AttachPresenter(IQueryPresenter presenter);
        void FillDetailsForm(Control content);
        void ClearResults();
        void EnableResultGrid();
        void DisableResultGrid();
        void StartResultGridProgress();
        void StopResultGridProgress();
        int GetSelectedWorkItemIndex();
        void DisplayResult(QueryResult result);
        void SetQueryCaption(string caption, string countCaption);
        void ShowDetails();
        void HideDetails();
        void UpdateResultGridRows();

        void SelectNextWorkItem();
        bool CanMoveToNextWorkItem { get; }

        void SelectPrevoiusWorkItem();
        bool CanMoveToPreviousWorkItem { get; }

        void RemoveSelectionFromResultGrid();
        void EnsureSelectedRowVisible();
        QueryLayoutState GetLayoutState();
        void ApplayLayoutState(QueryLayoutState layoutState);
        void SelectFirstQueryResult();
    }
}